N
AME
/precompiled/queue
- a queue of values
D
ESCRIPTION
/precompiled/queue implements a queue, or fifo. The main differance between /precompiled/queue and /precompiled/fifo is that queues will never block in write, only allocate more memory.
S
EE
A
LSO
/precompiled/fifo
N
OTA
B
ENE
Queues are only available on systems with POSIX threads support.
N
AME
write
- queue a value
S
YNTAX
#include <fifo.h>
void queue->write(mixed
value
);
D
ESCRIPTION
This function puts a value last in the queue. If the queue is to small to hold the value the queue will be expanded to make room for it.
N
AME
read
- read a value from the queue
S
YNTAX
#include <fifo.h>
mixed queue->read();
D
ESCRIPTION
This function retreives a value from the queue. Values will be returned in the order they were written. If there are no values present in the queue the current thread will sleep until some other thread writes a value to the queue.
N
AME
size
- return number of values in queue
S
YNTAX
#include <fifo.h>
int queue->size();
D
ESCRIPTION
This function returns how many values are currently in the queue.